package com.ws.spring.controller;

import com.ws.rain.core.result.R;
import com.ws.spring.dao.mapper.Index1Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author rain
 */
@RestController
public class TestController {
    private Index1Mapper index1Mapper;

    @Autowired
    public TestController(Index1Mapper index1Mapper) {
        this.index1Mapper = index1Mapper;
    }

    @GetMapping("/test")
    public R daoTest() {
        return R.data(index1Mapper.submeterQuery());
    }

    @GetMapping("/name")
    public R nameTest() {
        return R.success("ok");
    }


}
